package cn.momoshenchi.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;

/**
 * @version : 1.0
 * @author: momoshenchi
 * @date: 2021/6/14 - 3:06
 */
public class MatchVo
{
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     *
     */
    private String description;

    /**
     *
     */
    private String title;

    private  Integer rightAnswer;

    private final List<String> solutions=new ArrayList<>();

    public List<String> getSolutions()
    {
        return solutions;
    }

    public void add(String str)
    {
        this.solutions.add(str);
    }

    @Override
    public boolean equals(Object o)
    {
        if (this == o){ return true;}
        if (o == null || getClass() != o.getClass()) {return false;}
        MatchVo matchVo = (MatchVo) o;
        return Objects.equals(id, matchVo.id) && Objects.equals(description, matchVo.description) && Objects.equals(title, matchVo.title) && Objects.equals(rightAnswer, matchVo.rightAnswer) ;
    }

    @Override
    public int hashCode()
    {
        int result = Objects.hash(id, description, title, rightAnswer);
        result = 31 * result ;
        return result;
    }

    public Long getId()
    {
        return id;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public String getDescription()
    {
        return description;
    }

    public void setDescription(String description)
    {
        this.description = description;
    }

    public String getTitle()
    {
        return title;
    }

    public void setTitle(String title)
    {
        this.title = title;
    }

    public Integer getRightAnswer()
    {
        return rightAnswer;
    }

    public void setRightAnswer(Integer rightAnswer)
    {
        this.rightAnswer = rightAnswer;
    }


}
